<?php
class module_search extends module {
	
	function video_q() {
		$q = request::get("q");
		$start = request::get("start");
		
		$videos = youtube::getVideos($q, $start, 10);
		if ($videos->count() == 0) {
			$this->attach("videos", null);
		} else {			
			$this->attach("videos", $videos->getDataArray(true));
		}
		
		$this->output();
	}
}
?>